#include <bits/stdc++.h>

#define rep(i, j, k) for (int i = (j); i <= (k); ++i)
#define per(i, j, k) for (int i = (j); i >= (k); --i)
#define SZ(v) int((v).size())
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second
using ll = long long;
using pii = std::pair<int, int>;
using pll = std::pair<ll, ll>;

template<class T>inline void chkmn(T &x, T y) { if (y < x) x = y; }
template<class T>inline void chkmx(T &x, T y) { if (y > x) x = y; }

using namespace std;

const int maxn = 100;
const int maxm = 1000010;

int n, m = 30;
string s;
char a[maxn][maxn], ans[maxm];
int dx[] = {0, -1, 0, 1};
int dy[] = {-1, 0, 1, 0};

void init() {
  int op = 0;
  rep (i, 1, m) rep (j, 1, m) a[i][j] = 'R';
  for (int x = 2; x + 1 <= m; x += 3) {
    for (int y = 2; y + 1 <= m; y += 3) {
      a[x][y] = "GB"s[op], a[x][y + 1] = "BG"s[op];
      a[x + 1][y] = "GB"s[op], a[x + 1][y + 1] = "BG"s[op];
    }
    op ^= 1;
  }
  cout << m << " " << m << "\n";
  rep (i, 1, m) {
    rep (j, 1, m) cout << a[i][j];
    cout << "\n";
  }
}

int d(int x, int y) {
  return abs(x - 15) + abs(y - 15);
}

void dfs(int x, int y, int pos) {
  if (pos == n) {
    rep (i, 1, n - 1) cout << ans[i];
    cout << "\n", exit(0);
  }
  vector<pii> nxt;
  rep (k, 0, 3) {
    int tx = x + dx[k], ty = y + dy[k];
    if (tx < 1 || ty < 1 || tx > m || ty > m) continue;
    if (a[tx][ty] != s[pos]) continue;
    nxt.emplace_back(d(tx, ty), k);
  }
  sort(ALL(nxt));
  for (pii info : nxt) {
    int k = info.se;
    ans[pos] = "LURD"s[k];
    dfs(x + dx[k], y + dy[k], pos + 1);
  }
}

int main() {
  freopen("snake.in", "r", stdin);
  freopen("snake.out", "w", stdout);
  cin.tie(nullptr) -> ios::sync_with_stdio(false);
  cin >> s, n = s.length(), init();
  int sx = 1, sy = 1;
  rep (i, 1, m) rep (j, 1, m) if (a[i][j] == s[0] && d(i, j) <= d(sx, sy)) sx = i, sy = j;
  cout << sx << " " << sy << "\n";
  dfs(sx, sy, 1);
}